<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html>
	<head>
		<title>商品咨询内容管理</title>
		<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
		<script type="text/javascript">
function gotoPage(pageOffset, pageSize) {
	var form = document.getElementsByTagName("form")[0];
	form.elements["pager.offset"].value = pageOffset;
	form.elements["pageSize"].value = pageSize;
	form.submit();
}
</script>
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
	</head>
	<body>
		<html:form action="/others/myMessageManage" method="post">
			<input type="hidden" name="method" value="search" />
			<table width="100%" align="center">
				<tr>
					<td class="td_03">
					按内容查询：<input type="text" name="searchContent" value="${searchContent }"/>
				</td>
					<td class="td_03">按状态查询：<select name="searchType">
							<option value="3">
								全部
							</option>
							<option value="0" <%String str = request.getParameter("searchType"); if("0".equals(str)){out.write("selected='selected'");} %>>
								未回复
							</option>
							<option value="1" <%str = request.getParameter("searchType"); if("1".equals(str)){out.write("selected='selected'");} %>>
								已回复
							</option>
							<option value="2" <%str = request.getParameter("searchType"); if("2".equals(str)){out.write("selected='selected'");} %>>
								已删除
							</option>
						</select></td>
					<td class="td_03"><input type="submit" value="查询"/></td>
				</tr>				
			</table> 
			<logic:present name="MessageRange">
			<table width="100%" align="center">
			
						<tr>
							<td class="td_03">
								咨询内容
							</td>
							<td class="td_03">
								回复内容
							</td>
							<td class="td_03">
								操作
							</td>
						</tr>
						<logic:iterate id="message" name="MessageRange" property="records">
						<tr>
						<td class="td_03" >
								${message.content}
							</td>
							<td class="td_03" >
								${message.reply}
							</td>
							<td class="td_03" > 
							<logic:equal name="message" property="status" value="2">
								已删除
							</logic:equal>
							<logic:notEqual name="message" property="status" value="2">
								<a href="${ctx }/others/myMessageManage.do?method=selectById&myMessage.id=${message.id}" >回复</a>
								<a href="${ctx }/others/myMessageManage.do?method=deleteMyMessage&myMessage.id=${message.id}" onclick='{if(confirm("您确定删除吗?")){return   true;}return   false;}'>删除</a>								
							</logic:notEqual>
							</td>
						</tr>
					</logic:iterate>
				
				<tr>
					<td colspan="6" align="left">
						<%@ include file="/pages/safeai/jsp/common/page.jsp"%>
						&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
				
			</table>
				</logic:present>
		</html:form>
	
	</body>
</html>